Sulfide monitoring system and method

ABSTRACT

Methods and apparatus relating to systems for determination of sulfide species and hydrogen sulfide hazard potential of well drilling mud.

The present invention is directed to methods and apparatus for makingelectrochemical measurements, and, more particularly, is directed tosuch methods and apparatus which are particularly adapted for sulfidedeterminations in environments such as well drilling muds.

Remote sensing or measurement of potentially lethal materials such ashydrogen sulfide is desirable for purposes of corrosion control andpersonnel protection in environments such as oil drilling environmentswhere hydrogen sulfide deposits or strata may be encountered duringdrilling operations. The hydrogen sulfide thus encountered may not onlyhave a deleterious effect on equipment, but may be transported to thesurface in the drilling mud where it may be released into the ambienttemperature.

Conventionally, hydrogen sulfide presence in the drilling mud may bemeasured by air sensors, but such sensors have the disadvantage of beingdependent upon wind direction, and do not necessarily measure thepotential hazard from hydrogen sulfide presence in the drilling mud.Conventional aqueous sulfide measuring apparatus may not directlyprovide the appropriate information as to potential hazards or a desiredsulfide species such as hydrosulfide concentration. Further,conventional aqueous sulfide measuring apparatus may not be capable ofprolonged remote sensing operation in a drilling rig environment. Thus,improved methods and apparatus for measuring and determining thepotential hydrogen sulfide hazard, and the hydrosulfide concentration inwell drilling mud would be desirable.

Accordingly, it is an object of the present invention to provide suchimproved methods and apparatus. It is a further object of the inventionto provide such methods and apparatus which may be particularly adaptedfor operation in hostile or difficult sensing environments. It is afurther object of the present invention to provide such methods andapparatus which provide accurate measurements over a range oftemperatures and operating conditions encountered in drillingoperations.

These and other objects of the invention will become apparent uponconsideration of the following detailed description and the drawings ofwhich:

FIG. 1 is a perspective view of an embodiment of apparatus in accordancewith the present invention;

FIG. 2 is a graph showing the relationship between sulfide ion speciesand pH in aqueous solution;

FIG. 3 is a block diagram of the various circuit elements of theapparatus of FIG. 1;

FIG. 4 is a circuit diagram of the electrode and transmitter circuitryof the apparatus of FIG. 1; and

FIGS. 5, 5a, and 6 and 6a are circuit diagrams of the control board ofthe control instrument of the apparatus of FIG. 1.

Generally, the present invention is directed to mud monitoring systemsfor sulfide corrosion control and personnel protection for use ondrilling rigs where sulfide bearing deposits and strata may beencountered.

Various aspects of the invention concern methods and apparatus formeasuring the concentration of hydrosulfide ion [HS⁻ ], and methods andapparatus for determining the hydrogen sulfide hazard potential ofhydrogen sulfide dissolved in the drilling mud, by determining thehydrogen sulfide gas concentration which would be in gaseous equilibriumwith a soluble sulfide containing solution. The present disclosure isalso directed to temperature compensation circuitry for electrochemicalpotential signal processing, and is further directed to high impedanceelectrochemical electrode systems having a grounding current path formeasuring hydrogen ion and sulfide ion concentration in a groundedconductive solution. As indicated, various features of the presentinvention concern hydrosulfide ion measuring systems. In accordance withthe present invention, such systems are provided which comprise hydrogenion selective electrode means for providing an output signal having anelectrochemical potential which is a function of hydrogen ionconcentration, sulfide ion selective electrode means for providing anoutput signal having an electrochemical potential which is a function ofsulfide ion concentration [S⁻⁻ ], and means for combining a signalrepresentative of the electrical potential of the hydrogen ion electrodemeans and a signal representative of the electrical potential of thesulfide ion electrode means in a ratio of hydrogen ion potential tosulfide ion potential of about 1:2 to provide a difference output signalwhich varies as a function of the hydrosulfide ion concentration. Theapparatus (or methods) may further utilize means for combining a signalrepresentative of a predetermined electrochemical potential referencevalue with the sulfide ion representative signal and the hydrogen ionrepresentative signal, such that the said difference output signal isproportional to hydrosulfide [HS⁻ ] ion electrochemical potential. Theelectrochemical reference value may generally be provided by means of areference electrode.

In connection with aspects relating to the determination of thepotential hazard in respect of hydrogen sulfide gas concentration,methods and apparatus are provided for determining a hydrogen sulfidegas concentration which could be in gaseous equilibrium with an aqueoussulfide solution. Such methods and apparatus may utilize theelectrochemical potential output of hydrogen ion selective electrodemeans and sulfide ion selective electrode means such as described inconnection with the hydrosulfide determining methods and apparatus. Thehazard potential systems further utilize means for combining a signalrepresentative of the sulfide electrode potential with a signalrepresentative of the hydrogen ion electrode potential, to provide adifference output signal which varies as a function of the gaseoushydrogen sulfide equilibrium concentration which could exist inequlibrium with the aqueous sulfide solution being measured. Suchhydrogen sulfide hazard potential determining systems may furtherinclude means for combining a signal representative of a predeterminedelectrochemical reference potential value with the sulfide ionrepresentative signal and the hydrogen ion representative signal suchthat the difference output signal is proportional to the gaseoushydrogen sulfide equilibrium concentration which would exist inequilibrium with the aqueous sulfide solution.

As also indicated, various aspects of the present disclosure concerntemperature compensation in electrochemical measurement systems, andparticularly in systems in which electrochemical potentials are sensedremotely from signal processing and/or temperature compensationlocations. Such temperature compensation systems make use of theisopotential point of the electrochemical system under measurement, andfurther utilize digitized amplifier gain circuitry comprising anoperational amplifier means for providing an output signal current at anoutput terminal which is proportional to the potential differencebetween a reference input terminal and a signal input terminal, meansfor providing a temperature dependent electrochemical potential signalhaving an isoelectric point at which the value of the signal does notsubstantially vary with temperature, and means for providing a digitalvalue of the measurement temperature. The compensation system furthercomprises means for providing a voltage to said reference terminalsubstantially corresponding to the value of the isoelectric point, inputresistance means for providing an electrically resistive circuit betweenthe electrochemical signal means and the input terminal, and feedbackresistance means for providing an electrically resistive circuit betweenthe input terminal and the output terminal such that the ratio of thevoltage potential at said output terminal to the voltage potential ofthe temperature and species concentration dependent signal substantiallycorresponds to the ratio of the resistance of said feedback means to theresistance of said input resistance means. At least one of theresistance means should comprise a plurality of discrete resistanceelements selectively switchable to provide discrete predeterminedvariation of said resistance ratio, and through the provision of meansfor interconnecting these resistance elements in a predetermined mannersuch that the resistance ratio is incrementally changed withtemperature, the output voltage may be compensated so that it is notsubstantially temperature dependent at all species concentrations.

As indicated, aspects of the present disclosure concern potentiometricelectrochemical electrode systems for measuring hydrogen ion and sulfideion concentration in a grounded conductive solution. Remote sensing ingrounded solutions such as well drilling mud also presents difficultieswith respect to leakage currents and system grounding, which may produceundesired sensing electrode current (e.g., through rectification at theactive electrode-solution interface). Such difficulties may causeinaccurate readings, change electrode characteristics and producelong-term drifting. Electrode systems adapted to alleviate such problemsare provided comprising a pH electrode, a specific ion sulfideelectrode, and a reference electrode, and means in electricallyconductive relationship with said electrodes for measuring potentialbetween pairs of said electrodes, which is capable of being at a dc orac potential with respect to the solution. The electrode system furtherincludes grounding pin means in electrically conductive relationshipwith the electrodes and grounded conductive solution, for preventing acor dc current due to said potential from flowing through any of saidelectrodes between said measuring means and said conductive solution byproviding a path for said current to said conductive solution, the ratioof the impedance of the current path for said ac and dc current throughthe lowest impedance electrode path, to the impedance of said ground pincurrent path being at least about 100 and preferably at least about1000.

Turning now to the drawings, the previously described aspects of thepresent disclosure, and various of the aspects, will now be described indetail with respect to the embodiment of apparatus illustrated in FIGS.1, 3-6 of the drawings.

As illustrated in FIG. 1, the specific embodiment 10 of the apparatuscomprises a sensor and housing unit 12, a transmitter unit 14, and acontroller unit 16. The transmitter unit 14 and the control unit 16 areconnected by means of a four-conductor cable 18.

The sensor and housing unit 12 comprises a housing 20 for a hydrogen ionselective (pH) electrode 22, a reference electrode 24, sulfide ionselective electrode 26, and a combination temperature sensor/ground pinelement 28. The active sensing portions of the electrodes, sensor andground pin are disposed in a zone of the housing 20 which leaves thesensors open to the environment, but protects them from mechanicaldamage, while the electrical terminal connection ends of these elementsproject through seals into a hermetically sealed zone 30 of the housing20 in accordance with conventional practice. In use, the sensor housingwill generally be mounted in a location that is filled with drilling mudduring normal drilling operations, and will be located as close to themud flow line discharge as possible, because the closer the sensor unitis to the discharge point, the sooner sulfide and pH changes willdetected by the apparatus 10. In this connection, the sensor may belocated either in the "possum belly" or in the mud tank directly belowthe shale shaker in a conventional drilling mud circulation system. Ofcourse, the housing should be mounted so that it will not become buriedin cuttings that settle to the bottom, and the transmitter assembly 14should not become submerged when the mud is at its highest level.Accordingly, sealed conduit 32a of desired length (shown broken away inthe drawing to indicate variable length) may be provided between thehousing 12 and the transmitter unit 14 to shield the electrical cableconnections between the transmitter 14 and the electrodes, ground pinand temperature sensor.

The electrodes 22, 24, 26 develop electrochemical potential voltages,and the temperature sensor 28 also develops voltage potentialinformation through an appropriate resistance mechanism. The transmitterunit 14 converts the voltage potential information of the electrodes andtemperature sensor to variable current signals, and transmits thesesignals by means of cable 18 to the controller 16 for appropriateprocessing and display. The varying voltage information is converted tocorrespondingly varying current information so that it may betransmitted over the cable 18 (which may be 1000' or more in length).The transmitter 14 comprises a plurality of high-impedance,constant-current, voltage-to-current conversion circuits, and the powerto drive the voltage-to-current conversion circuitry of the transmitter14 is obtained from the control unit as will be more fully described. Atthe control unit 16 at which the transmitter signals are received andprocessed, the processed information is displayed on a display panel asshown in FIG. 1. The control unit 16 display panel 32 comprises ahydrosulfide ion [HS⁻ ] display section 34, a hazard potential displaysection 36, a pH display section 38, and a system reference andcalibration section 40.

The hydrosulfide ion display section 34 displays the concentration ofhydrosulfide ion as the negative log of the concentration (pHS⁻notation), and comprises a digital pHS⁻ display element 302, a digitalpHS⁻ alarm set switch element 304, and an alarm light 306 which isactivated when the pHS⁻ concentration exceeds the value of the alarm setswitch 304. The display can show values of pHS⁻ from 00.0 to 19.9.However, concentrations below that indicated by a pHS⁻ of about 5.0 areso small that the readings may be utilized primarily only to indicatetrends of concentration changes. The pHS⁻ digital alarm set switch 304may be used to set an alarm point anywhere from pHS⁻ =00.0 to pHS⁻=19.9. A pHS⁻ alarm relay and the pHS⁻ alarm lamp 306 are both activatedwhenever the pHS⁻ display reading is equal to or numerically smallerthan the number of the pHS⁻ digital alarm set switch such that the alarmis activated when a preset concentration of HS⁻ is equalled or exceeded(pHS⁻ numbers decrease as the concentration of HS⁻ increases). As asafety feature, this alarm (like all alarms on the instrument) requiresmanual resetting.

The hazard potential display section 36 displays the concentration, inparts per million, of hydrogen sulfide gas which could exist inequilibrium with the mud sensed by the electrodes. This generallycorresponds to the concentration of H₂ S which could exist directlyabove the mud in still air. The display section 36 comprises a digitalhazard potential display element 308, a digital high alarm set switch310 with high alarm light 312 which is activated when the hazardpotential reading exceeds the value of the high alarm set switch 310,and a digital low alarm hazard potential set switch 314 withcorresponding hazard potential low alarm light 316 which is activatedwhen the hazard potential exceeds the value of the digital alarm setswitch 314.

The digital hazard potential (HP) display 308 indicates H₂ S gasequilibrium concentration values from 00 to 99 ppm. Should aconcentration higher than 99 ppm be measured, the HP display will blink"99" to indicate that the apparatus 10 is out of range. A small flashing"0" can also appear to the left of the HP reading to indicate that thesensor is being operated outside of its predetermined temperature range(or if the "temperature" or "common" cable connection to the transmitterand/or temperature sensor is open circuited). The digital high and lowHP alarm set switches 310, 314 are thumb wheel switches used to setalarm points from HP=00 to HP=99. The low HP alarm relay and the low HPalarm lamp 316 are both activated whenever the HP display reading isequal to or greater than a number which may be manually applied to theHP digital low alarm set switch 314. The high HP alarm set switch 310works identically to the low HP alarm switch 314.

The HP low alarm lamp fixture 316 is a combination lamp and switch; thelamp is activated when the HP low alarm relay is energized. When theswitch portion of this fixture is depressed, it over-rides the alarminhibit circuit that is in operation when the instrument is in the testmode, which will be subsequently described.

The HP high alarm lamp fixture 312 similarly is a combination lamp andswitch. The lamp element is activated when the HP high alarm relay isenergized. The switch portion may be depressed to cause the HP display308 to indicate the binary coded temperature range in which thetemperature sensor is operating.

The pH display section 38 similarly comprises a digital pH displayelement 318, together with a digital pH alarm set switch 320 and a pHalarm light 322 which is activated when the measured pH is lower thanthe value of the pH alarm set switch 320. The digital pH displayindicates the hydrogen ion concentration at the pH electrode 22. Thedigital pH alarm set switch 320 is adapted to permit the setting of analarm point in the display range from pH=00.0 to pH=19.9. The pH alarmrelay and the pH alarm lamp 322 are both activated whenever the pHdisplay reading is equal to or numerically smaller than the pH digitalalarm set point. The pH alarm lamp fixture 322 also is a combinationlamp and switch. The lamp portion is activated whenever the pH alarmrelay is energized, and the switch portion is the alarm reset switch forall of the alarm circuits (including the pHS⁻, pH, and low and high HPalarms).

The system calibration display and control section 40 comprises a systemfailure or trouble light 324, together with calibration controls 326 andreference controls 328. The fail lamp fixture 324 is similarly acombination lamp and switch. The lamp is activated (1) when there is anopen circuit in the cable 18 or to the sensors 22, 24, 26, 28; (2) whenthe line or battery voltage to the controller unit 16 is below apredetermined value; (3) when the test switch associated with the faillight fixture 324 is depressed; or (4) for a period of about 60-120seconds either after the instrument has been turned on, or after any ofthe above conditions has been rectified. When the fail lamp 324 isactivated, all alarm relay and indicator lamp circuits are deactivated.

Test readings for the hazard potential, pH and the temperature code canbe introduced by depressing the test mode switch and set, respectively,by adjusting the three adjustment pots labeled "pH ref", "HP ref", and"temp ref" of controls 328. pHS⁻ and HP are inter-related with pH aswill be more fully explained hereinafter. Particularly, if theinstrument will normally be operating for long periods of time below thelimits set for alarm activation, the test instrumentation featurespermit checking the operability of the alarm lights, displays andexternal warning systems. However, these features do not test theelectrodes and temperature sensors, which are checked by an appropriatecalibration procedure utilizing a suitable calibration solution of knownpH, hazard potential and temperature and the calibration controls 326including three pots correspondingly labeled pH Cal, HP Cal, and TempCal.

A block circuit diagram of the apparatus 10 is shown in FIG. 3 of thedrawings, with previously described functional circuit elements of thefront panel of the instrument shown as solid blocks in functionalinterrelationship with other circuit elements shown as dashed blocks. InFIG. 3, it may be seen that the electrochemical potential pH, referenceand sulfide electrode signals 22, 24, 26 are converted to correspondingpH and pS⁻⁻ current signals, as is the IR voltage drop across thetemperature probe 28, by the voltage-to-current converter elements ofthe transmitter. The resultant current pH, pS⁻⁻ and temperatureinformation signals are respectively conducted by lines of the cable 18to three channel current steering switch 340, which under the control ofthe test mode switch element of fail light 324, directs either theactual pH, pS⁻⁻ and temperature signals or a simulated set of suchsignals from test signal control element (reference pots) 328 and testsignal generator 344, to arithmetic circuit element 342. The arithmeticcircuit element 342 calibrates (with appropriate input from calibrationcontrols 326), processes and compensates the actual or synthetic pH,pS⁻⁻, and temperature signals to produce output signals for pH, pHS⁻ andhazard potential (HP).

The compensated pH signal is directed to a conventional binary codeddecimal analog to digital converter (BCD A/D) element 346 for directdigital conversion of the signal. The digital pH output signal isdirected to the pH display 318, and to pH comparator 348 which comparesthe digital pH value with the digital alarm set switch for activation ofthe pH alarm relay 349 for the alarm light 322.

The compensated analog pHS⁻ signal from the arithmetic processor 342similarly is directed to a conventional BCD A/D circuit element 350 forbinary pHS⁻ display 302. Similarly, the digital pHS⁻ value is comparedwith the value of digital pHS⁻ alarm set switch 304 by pHS⁻ comparator352 for appropriate activation of pHS⁻ alarm relay 354 and pHS⁻ alarmlight 306.

The units of the compensated pH signal, are defined as the negativelog₁₀ of the concentration of hydrogen ions, in moles/liter. Thecorresponding units of the compensated pHS⁻ signal are defined as thenegative log₁₀ of the concentration of HS⁻ ions in percent, where theHS⁻ percentage is normalized in terms of one gram HS⁻ per 100 cc ofsolution being defined as one percent HS⁻. The logarithmic "p"representation is desirable in view of the wide range of H⁺ and HS⁻concentrations which may be encountered by the instrument.

The compensated hazard potential signal derived by the arithmeticcircuits from the pH, pS⁻⁻ and temperature information, as indicatedpreviously represents an equilibrium value of the H₂ S gas which couldexist in the ambient atmosphere in equilibrium with the mud or otheraqueous system under measurement (it is not a direct measurement ofambient H₂ S gas) and thus is a valuable representation of the potentialimmediate hazard in respect of mud sulfide content. The compensatedanalog hazard potential signal from the arithmetic circuitry 342, likethe pH and pHS⁻ signal is in logarithmic (base 10) form. For appropriatedisplay as ppm H₂ S, the signal is directed to binary analog/digitalconverter 356, the resulting binary data from which is stored in HP datalatch circuit 358 which also includes a linear-exponential read-onlymemory look-up table for digital conversion of the initially resultinglogarithmic binary data to a linear digital ppm representation.

The digital data from the HP latch circuit 358 when (normally) selectedby the two channel selector 360, is directed to the HP display 308, andis directed to high and low HP comparators 362, 364 for comparison withthe respective values of the HP set switches 310, 314 for activation ofhigh and low HP relays 370, 372 and alarm lights 312, 316.

The arithmetic circuit element 342 utilizes digitalized temperaturecompensation and requires digital temperature information. Thus, theanalog temperature signal is directed to A/D converter 356 which forpurposes of efficiency is the same A/D converter used for the HP datasignal. Commutator 374 accordingly is used to alternately select inseriatim the HP or temperature analog signal input to A/D converter 356,and to direct the resulting binary data to the appropriatelycorresponding latch storage element. In this connection, the four-bitbinary temperature data is directed to and stored at temperature datalatch 376, from which it is made available to the arithmetic circuits342, and for display in octally coded form at HP display 308 throughselector 360 by means of select switch 378.

As shown in FIG. 3, the apparatus 10 also comprises various othergenerally conventional circuit elements including power supply andtrouble-fail circuit elements 380, 382, 386, 388, 390, 394, 396, 398,399.

FIG. 4 is a circuit diagram of the transmitter remote assembly 14 whichreceives the voltage potential signals from the pH, refernce and pS⁻⁻electrodes 22, 24, 26 and the temperature probe section of the pin 28,and converts these signals to current representation of pH, pS⁻⁻ andtemperature signals for transmission to control unit 16. Only the cableconnections to the electrodes are shown in FIG. 4, it being understoodthat conventional pH electrodes (such as Sensorex S 200 G pHelectrodes), pS⁻⁻ electrodes (such as Orion 94-16A, sulfide ionselective electrodes) and reference electrodes (such as Sensorex S 200RD double junction standard chloride reference electrodes) may be used.

The transmitter circuitry of FIG. 4 comprises voltage supply and systemcommon circuit 1, temperature voltage-to-current converter circuit 2(comprising subcircuits 2a, 2b), rf filter circuits 3a, 3b, 3c, 3d, pHelectrode voltage-to-current converter circuit 4, pS⁻⁻ electrodevoltage-to-current converter circuit 5, input rf filter circuits 6 and 7for circuits 4, 5 and reference electrode circuit 8 and constant biascurrent circuit 9 for circuits 4 and 5. The transmitter circuitry alsoprovides for a low impedance current path to the grounded solution (mud)via the ground pin section of the temperature sensor element 28 of thehousing 12.

As indicated, the remotely locatable transmitter 14 draws all its powerfrom the controller unit. However, because it is desirable to limit thenumber of wires in the cable 18, the transmitter is of particular designto utilize data transmission wires in the transmission of power from thecontroller. In this connection, it will be noted that there are onlythree separate information transmission wires, respectively, for theanalog pH, pS⁻⁻ and temperature current signals, and a common returnline. In order to effectively accomplish the power transmission andprovide for efficient interpretation of the three information channelsignals, the voltage-to-current conversion circuits 2, 4, 5 are eachadapted to draw a substantially constant amount of current for circuitutilization. The constant currents may be added to variable datacurrents drawn over the individual data lines, and appropriatecompensation may be made at the controller to compensate for theconstant current addition to the data signals. The constant currentsutilized by the voltage-to-current converters 2, 4, 5 and the variablepH, pS⁻⁻ and temperature representative current signals drawn by thevoltage-to-current converters 2, 4, 5 over the respective data lines aresummed and returned to the controller via the common return line.Because the pH signal has the largest current sensitivity, the constantcurrents used by each of the voltage-to-current converters 2, 4, 5 aredesirably summed, and drawn as an added constant signal to the variablepH signal, leaving the respective pS⁻⁻ and temperature data lines tocarry only the less sensitive pS⁻⁻ and temperature signals which wouldbe more prone to error from an additive constant signal introduction.

In order to avoid bidirectional current signals which could otherwiseoccur on current conversion of the voltage signal from the pH electrode(which normally would have a maximum output range of about 0 volts±7times its maximum 59.2 millivolt per pH unit sensitivity slope at 25°C.) a constant voltage is added to the pH line in excess of the maximumnegative voltage which would be produced in the pH electrode signal. Inthe illustrated embodiment, the add-on voltage to the pH voltage signalis 1000 millivolts (1 volt) which is provided by voltage referencecircuit 1, which draws constant current input from the pH line todesired voltage reference levels and establishes transmitter commonvoltage reference lines. In this connection, a one volt regulated sourceV₂ is established across resistor R11 of circuit 1, and an artificialcommon is established at the junction of resistors R12 and R15 such thata voltage V₁ of 1.0 volts is eatablished between the common and a systemcommon as shown in circuit 1. The constant reference voltages areutilized by the constant-current drawing voltage-to-current converters2, 4, 5.

Subcircuit 2a of the temperature current converter circuit 2 convertsvoltage V₂ from the voltage reference circuit 1 into a constant currentof 1 milliampere, which is directed through the resistance wire coil ofthe temperature probe sensor.

This voltage to current conversion of circuit 2a is accomplished byoperational amplifier U2, pins 3, 4, 11, transistors Q10, Q15 andresistor 405, with the 1 ma current being supplied at the output oftransistor Q10 which is forced to travel through the common 402 to whichthe temperature circuit is referenced, to the other side of the platinumcoil temperature probe, to provide a voltage proportional to thetemperature as determined by its temperature-resistance variation. Theresulting voltage difference is utilized as an input into voltagecurrent converter circuit 2b, comprising operational amplifier U2, pins5, 6, 9, transistors Q11, Q12, and resistors R21, R22. Circuit 2a isthus seen to be a circuit which draws a constant current, and thecircuit 2b output is a current signal representative of the temperaturevoltage information from the sensor 28. The resulting variabletemperature output current signal drawn by circuit 2b via conductor 404from pin 1 of terminal block (TB) 1 which connects to the temperatureline of cable 18 through filter circuit 3a.

The voltage-to-current converter circuit 2b draws approximately 25nanoamperes of current in the conversion of voltage to the currentsignal. However, it is undesirable to force even such a small amount ofcurrent through the pH or pS⁻⁻ ion selective electrodes and accordingly,circuits 4 and 5, which are high impedance voltage-to-current circuits,are provided which utilize very small amounts of currents from theelectrode voltage source (on the order of about 10 picoamperes) andwhich each also draw substantially constant current from the voltageregulation circuit 1 in their operation. Circuit 4 comprises a partiallyintegrated and partially discrete high impedance operational amplifiercircuit which draws effectively constant current, and is connected as avoltage-to-current converting circuit associated with the pH electrode22. Viewing pin 3 of Q6 as the noninverting (+) input, pin 7 of Q6 asthe inverting (-) input, and pin 11 of U1 as the output of the partiallyintegrated and partially discrete operational amplifier, circuit 4 isseen to be identical in function to circuit 2b in that it provides acurrent signal (through Q2 and Q3) representative of the voltage presentat the noninverting operational amplifier input, which in this case isthe voltage output of the pH sensor, plus V1. The variable current pHsignal drawn by the transistor pair Q2, Q3 at conductor 406 is added toconstant currents drawn by the transmitter circuitry along conductor408, and the resulting constant and pH variable current is drawn fromthe controller unit along the pH line of cable 18, through pin 2 of TB1and rf filter 3c.

Resistor R25 along with the capacitor C7 for a radio frequency filtercircuit 6 for the high impedance pH input to circuit 4, which is adaptedto remove rf signals which might otherwise be picked up on the pHelectrode line.

The voltage potential utilized as the input for the pHvoltage-to-current conversion in circuit 4 is the potential developedbetween the actual electrochemical input voltage from the pH electrodeand the potential of system common bus 410 of voltage reference circuit1, which is at a voltage V1 with respect to the artificial common line401 of circuit 1.

In this regard, the reference electrode 24 is connected through pin 5 ofTB1 to reference electrode input circuit 8 at voltage V1 with respect tosystem common bus 410. The common bus 410 may be traced through voltagereference V1 (through resistors R16 and R15 of circuit 1) to pin 13 ofoperational amplifier U1 of circuit 8 which is maintained at the samepotential as pin 12 of U1 in voltage. Pin 12 of U1 is also the referenceelectrode connection which is thus at a base voltage V1. By connectingthe reference electrode at a voltage V1 above the common bus 410, avoltage V1 is added to the pH voltage. Thus, if the pH of a solution is,for example, pH7, then by the addition of voltage V1 to the referenceelectrode potential, the resulting pH input to circuit 4 would be alsoat V1, because by definition of the pH electrode reference system, thevoltage between the standard chloride reference electrode 24 and pHelectrode 22 at pH7 is zero. In this manner, 1000 mv is added to pHsignal, thus allowing the variable pH current to be unidirectional uponconversion to current representation by circuit 4.

Circuit 5 is the voltage-to-current converter for the sulfide electrodepotential and is substantially identical to circuit 4. Like circuit 4 itprovides a high impedance input of at least about 1×10¹² ohms for itsassociated electrode so that a current of about 10 picoamperes or lessis permitted to flow through the electrodes. In circuit 5, the signaloutput current drawn by the collectors of transistors Q4 and Q5 is drawndirectly from the controller 14 through the sulfide signal line of cable18 to pin 3 of TB1, and through rf filter circuit 3b. This isdistinguished from circuit 4 for the pH voltage current converter wherethe current is connected to a common bus 408 which receives a pluralityof small, constant currents from the various parts of the transmittercircuitry which require power, as previously discussed. Circuit 9 is ameans for providing a constant bias current out of the sources of Q6 andQ7 for circuits 4 and 5. Thus, the pH signal current which is drawn bythe collector of transistors Q2 and Q3 of circuit 4 is combined with theother constant currents. The respective return (opposite) currentsincluding the constant currents and the signal variable currents for thepH, temperature, and pS⁻⁻ signals, are collected at system common 410and carried through protective and bias diodes CR3, CR4, through rffilter circuit 3d to pin 4 of TB1 for the common return line of thecable 18 to the controller. In this manner, the sulfide and temperaturesignal lines of cable 18 are provided with variable currents which onlyrepresent the respective sulfide and temperature information. In thecase of the pH signal line, the constant currents used in the operationof the transmitter are added to the pH variable current signal, becausethe pH signal has a larger current sensitivity than the pS⁻⁻ andtemperature signals.

Circuit 8 provides a conductive path for ac and dc leakage currents(from the controller, remote ground potential difference, auxiliaryrecorders, etc.) which could otherwise be forced through the electrodeswith deleterious effects on accuracy and stability. In this regard, aspreviously discussed, pins 13 and 12 of U1 of circuit 8 are kept at thesame potential when this operational amplifier is in normal operation,and accordingly, the reference electrode connection (pin 5 of TB1) ismaintained such that it is at the same potential of the junction ofresistors R12 and R15 (V1 one volt-above the transmitter system commonbus 410). A low impedance current path is established to the groundedmud solution via ground pin bearing the voltage across transistor Q17 ofcircuit 8 such that the potential of the whole transmitter floats withrespect to the ground pin until the reference electrode finds itself ata potential 1 volt above the transmitter common. Any leakage currentwill thus preferentially be conducted via the collector of transistorQ17 of circuit 8 to pin 6 of TB1 via the ground pin 28. The ground pin28 is a low impedance electrode having an impedance of about 10 ohms orless (e.g. stainless steel pin) which is in direct electrical contactwith the grounded mud. In the absence of this feature of circuit 8, theleakage current could be forced through the reference electrode to themud. The reference electrode input impedance of circuit 8 is at leastabout 10 megohms.

Diodes CR4 and CR3 provide a voltage bias to keep the transmitter commonbus 410 away from the absolute common line of cable 18 which goes to thecontrol unit. This permits the various operational amplifiers ofintegrated circuits U1 and U2 to operate within their specifications inthat the supply connections to the various operational amplifiers at pin10 of U1 and pin 10 of U2 come directly off this absolute common 412.Thus, except for CR1 which is a protective diode to protect thetransmitter in the event of reverse polarity hookup, the only connectionto the absolute common 412 are these supply connections, and the emitterof transistor Q17 of circuit 8, the collector of which is connecteddirectly to the solution ground. The voltage between the emitter and thecollector of Q17 of circuit 8 is controlled by the operational amplifierU1 pins 12, 13 and 2 of circuit 8 to make the reference electrode basepotential 1 volt above the transmitter common bus 410. Thus changes inthe potential of the low impedance grounding electrode due to leakagecurrents flowing through it are absorbed by the transmitter, and byproviding high impedance input circuits for the electrodes, the leakagecurrents are prevented from being forced through the delicate electrodemembranes.

As indicated, these respective signal currents are drawn to thetransmitter 14 from the controller 16 over the three signal wires ofcable 18 (and return via the common return line of cable 18). The signalinformation is processed in the controller 16 to provide the compensatedpH, pHS⁻ and HP signals as discussed in connection with the schematicdiagram of FIG. 3. The manner in which these output signals are obtainedwill now be generally discussed, and the specific circuitry of theembodiment of controller 16 for obtaining these desired signals willsubsequently be discussed with reference to the circuit diagrams ofFIGS. 5 and 6.

The sulfur content in drilling muds exists primarily in the followingfive states: (1) H₂ S (dissolved); (2) HS⁻ hydrosulfide ion; (3) S⁻⁻sulfide ion; (4) free sulfur(s); and (5) heavy metal sulfideprecipitates. Sulfur in states 4 and 5 is normally not of immediateconcern from the standpoint of safety, although it is possible toconvert sulfur in states 4 and 5 to states 1, 2 and/or 3, under redoxconditions or if the mud becomes acidic. However, drilling muds aregenerally maintained at a basic pH in the range of from about 8 to about12 to provide various properties unrelated to sulfide control. The totalsoluble sulfur content of the drilling mud (S_(T)) may be defined as:S_(T) =H₂ S(dissolved)+HS⁻ +S⁻⁻ . The specific proportions of each ofthe three states relative to S_(T) is dependent on the pH of the mud asshown in FIG. 2 of the drawings from which it may be seen that thesoluble sulfur content of the mud is interchangeable between states 1,2, and 3 with changes of pH of the mud. However, it will be appreciatedfrom FIG. 2 that between pH 8 and 12, nearly all of the total solublesulfur (S_(T)) exists as hydrosulfide ion HS⁻. Accordingly, the totalsoluble sulfur content (S_(T)) of the mud in most drilling applicationsis almost equal to the HS⁻ concentration. Thus, from a determination ofHS⁻ concentration, it is possible to determine how much sulfidescavenger should be added to precipitate out the sulfides that arelikely to become an H₂ S hazard. It will also be seen that as the pH ofthe mud is decreased, the amount of dissolved H₂ S, which would beavailable to establish an equilibrium with an H₂ S gas concentration inthe ambient temperature, will increase, thus increasing the potentialatmospheric H₂ S hazard.

Accordingly, the instrument 10 provides a compensated measurement ofatmospheric hazard potential and HS⁻ concentration through appropriatesignal processing of the electrochemical potential measurement availablefrom the pH, pS⁻⁻ and reference electrodes 22, 24, 26. Theelectrochemical potential E_(pH) of the pH electrode with respect to areference electrode may be expressed as a conventional Nernst equation:##EQU1## where K represents reference electrode Nernst expression##EQU2##

Similarly, the electrochemical potential E_(S).spsb.-- of the sulfideelectrode with respect to the reference electrode may be represented inNernst equation form: ##EQU3## Upon subtracting the Nernst sulfidepotential of Equation 2 from the pH potential of Equation 1, a hazardpotential E_(HP) may be derived which is independent of referenceelectrode expressions, where E_(HP) =E_(pH) -E_(S).spsb.--, and E°_(HP)=E°_(pH) -E°_(S).spsb.-- : ##EQU4## The distribution of the variousforms of soluble sulfur is a function of pH as discussed previously, andthe soluble sulfur is also in potential equilibrium with the atmosphere.These equilibrium relationships may be represented by the followingexpressions: ##EQU5## where K₁ is the equilibrium constant betweensulfide ion and hydrosulfide ion, where K₂ is the equilibrium constantbetween hydrosulfide ion and dissolved H₂ S, and where K₃ is theequilibrium constant between dissolved H₂ S and H₂ S gas in parts permillion in the atmosphere (e.g., adjacent the mud). The followingexpression may therefore be obtained: ##EQU6##

Appropriate substitution of equation 7 for the [H⁺ ]² [S⁻⁻ ] expressionof Equation 3 provides the following expression: ##EQU7## Because thestandard electrochemical hazard potential E°_(HP) is a constant, andbecause the log of the indicated constants K₁ K₂ K₃ is a constant, atconstant temperature, Equation 7 may be re-written such that E_(HP) isshown to be a direct function of the log of the potential equilibrium H₂S gas concentration: ##EQU8## where ##EQU9## In this connection, valuesof the indicated constants are approximately as follows:

K₁, about 1× 10⁷

K₂, in the range of about 1× 10¹² to 1× 10¹⁴

K₃, about 1× 10⁷

E°_(HP), about 450 millivolts

The appropriate derivation of the HP signal is provided by the controlunit 16.

In connection with derivation of the HS⁻ concentration signal, half ofthe pH-reference potential may be subtracted from the sulfide referencepotential; thus, subtracting half of Equation (1) from Equation (2)produces the following expression: ##EQU10## Because [H⁺ ] [S⁻⁻ ] = [HS⁻]/K₁, Equation (10) may be re-written as ##EQU11## Therefore, byelectronically subtracting half of the pH signal from the sulfidesignal, the resulting signal is directly proportional to pHS⁻, since atconstant temperature E°_(S).spsb. --, E°_(pH) , K₁ and K are essentiallyconstant.

Thus, -log [HS⁻ ], which by definition is pHS⁻, may be derived from themeasured potential of the sulfide-reference electrode system and thepH-reference electrode system,

It will be appreciated that the measured potential of theelectrochemical systems will vary with the temperature of the drillingmud. The measured values for pH and the derived values for pHS⁻ and HPshould accordingly be temperature-compensated. Furthermore, individualelectrodes, and particularly pH electrodes, may have a responsesensitivity which deviates from the ideal sensitivity, generally byhaving a diminished output voltage vs. log concentration response slope.Thus, while pH electrode sensitivity slope may ideally be 59.2millivolts/concentration decade, individual electrodes may vary from,say, 48 millivolts per decade of species concentration, to 59.2 voltsper decade, and circuit means for compensating for such electrodesensitivity variation should desirably be provided.

In connection with pH electrode temperature compensation, the electrodepotential output variation with temperature may be compensated bynormalizing the electrode response curve about its isopotential point, apoint on the electrochemical potential vs. H⁺ concentration curve atwhich there is no substantial variation in potential with temperature.The isopotential point for a pH electrode will generally be at a pH of 7in an aqueous system such that a family of output potential versusconcentration function response curves representative of operation atdifferent temperature will all pass through the isopotential point at pH7. Because the response curves of the output potential are generallylinear functions when the species concentration function is a logfunction, the temperature compensation may be accomplished by adjustingthe slope of the linear functions to normalize the slope to that for apredetermined, standard temperature. The slope may readily be adjustedby adjusting the gain of an amplifier such as an operational amplifier(in a voltage gain configuration) in which the linear potential vs. log[H⁺ ] concentration function is biased with the isopotential outputvoltage and with the isopotential species concentration, respectively.In this manner, the isopotential point may be thought of as beingdisplaced to the origin of voltage and concentration coordinates, sothat the slope of the linear function may be normalized simply by atemperature-compensatory change in the gain of the amplifier. Individualvariations in electrode sensitivity may be compensated to apredetermined response sensitivity by gain variation at the isopotentialpoint normalized response curve. The isopotential point normalizingbias(es) may be restored after temperature and/or sensitivitycompensation.

It has been determined that the hazard potential function and the pHS⁻function previously discussed have respective isopotential points atwhich the functions of system potential do not change with changingtemperature. These points may be determined by differentiating therespective functions with respect to temperature to determine the pointat which the rate of change with respect to temperature is equal tozero. Thus, by normalizing the species response functions to theirrespective isopotential points, temperature (and sensitivity)compensation may readily be made by adjusting of amplifier gain. Thenormalizing bias values may be restored after compensation.

As indicated, such compensation may be applied through the use of anoperational amplifier in a voltage gain configuration, in which the gainis determined by the ratio of the resistance R_(f) of a resistanceconnection between an amplifier input (e.g. the inverting input) andoutput channels, and the resistance R_(in) of a voltage signal to theinput channel. By digitizing the R_(f) and/or R_(in) resistance valuesthrough the use of appropriately controlled fixed resistor elements andswitches, the gain function may be made a discrete function which iscorrelatively responsive to discrete temperature or electrodesensitivity information. As will be further described in connection withthe specific circuitry of the controller, such digitized, isopotentialgain circuits are utilized in the provision of effective and efficientinstrumentation circuitry in accordance with the present invention.

Turning now to FIGS. 5, 5a, and 6, and 6a arithmetic circuits 342 (FIG.3) which process and compensate the signal currents and circuitsgenerally related to the arithmetic circuits will now be morespecifically described. The illustrated circuit diagram has beenseparated into the 4 sheets of drawing, FIGS. 5, 5a, 6, 6a such thatFIG. 5 is the upper left hand corner of the circuit, FIG. 5a is theupper right hand corner of the circuit, FIG. 6 is the lower left handcorner of the circuit, and FIG. 6a is the lower right hand corner of thecircuit. The circuit of FIGS. 5, 5a, 6, 6a should be considered to beone continuous circuit joined at the respective connections bearing thematching letter or voltage reference designations, hereinafter, in thisspecification reference to FIG. 5 will includes FIGS. 5 and 5a, whilereference to FIG. 6 will include reference to FIGS. 6 and 6a.

The circuitry of FIGS. 5 and 6 comprises digitized operational voltageamplifier circuit means 10 for compensating (standardizing) the responsesensitivity of an isopotential normalized pH electrode signal, andcircuit means 20a, b, c for temperature compensation of respectiveisopotentially normalized pH, pHS⁻ and pHP [i.e. log (hazard potential)]signals, and further comprises circuit means 30a, b for providingreference signals (see test controls 328,324 of FIG. 3). The circuitryalso includes a plurality of translator filter means circuits 40a, b, cfor converting the respective current signals drawn through the pH,pS⁻⁻, and temperature lines of cable 18, to voltage representation, andfor filtering any audio frequency components on the lines.

In normal operation, the three data signal lines for pH, pS⁻⁻ andtemperature current signals drawn to the transmitter are connected topins 8, J and 9 on the edge connector 500 of the control board circuitas shown in FIGS. 5 and 6. These signals go to the respective lines ofcable 18 to the transmitter through intermediate connection throughrespective radio frequency filters on the mother board (not shown)identical to filter circuits 3a, b, c, d of the transmitter circuitry.In this mode, diodes CR1, CR2 and CR3 of circuit 30a are biased in theforward direction because the current is flowing from a 15 volt supplythrough respective current sensing resistor R44 of pH input circuit 40a,current sensing resistor R54 of pS⁻⁻ input circuit 40b, and currentsensing resistor R63 of temperature input circuit 40c, out to thetransmitter. If the pH, pS⁻⁻ or temperature of the mud increases (ordecreases) the current increases out to the transmitter on therespective signal line, and the voltage drop across the respectivesensing resistor increases (or decreases). In this manner, the signalinformation from the transmitter electrodes and sensor is supplied tothe controller circuitry. However, when the front panel test switch isdepressed, the instrument goes into a test mode in which an artificialtest set of pH⁺, pS⁻⁻ and temperature signals supplied by circuit 30b issubstituted for the actual signals.

Operational amplifier circuit means 50 a, b, c are respectively providedin connection with the temperature compensation circuits 20 a, b, c forinverting and filtering the respective pH, pHP and pHS⁻ signals, andcircuit means 60 is provided for pHS⁻ signal derivation.

The control circuit further comprises logic circuit means 70 forcommutating the A/D conversion of the temperature and pHP signals,reference circuit means 80 for providing voltage reference potential,voltage comparator circuit means 90 (detector 388, FIG. 3), circuitmeans 100 for low current detection (detector 361, FIG. 3), and circuitmeans 110 for detecting circuit failure (see delay circuit 396, FIG. 3).

When the instrument is in the test mode, the transmitter currents arepulled directly to the 15 volt supply without going through currentsensing resistors R44, R54, and R63, and protective diodes CR1, CR2,CR3, CR4, CR5, CR6 are provided to prevent instrument damage fromshorting in either the test mode or the operational mode. In the testmode, the current through the current sensing resistors R44, R54 and R63is controllable by variable resistors R38, R39 and R40 of circuit 30brather than by the information signal current to the transmitter, sothat the instrument may be tested to see if it is working normally (e.g.by setting the pH and pS⁻⁻ values and checking the corrections of the HPvalue derived by the instrument).

However, the arithmetic circuitry of the control unit functions in thesame manner whether there are actual signals from the transmitter orreference signals from circuit 30b applied to the input circuits 40 a,b, c.

In any event, the current signals from the transmitter or test circuit30b are transferred into voltage signals by the current sensingresistors R44, R54, R63, in translator filter circuits 40a, b, c.Circuit 40a is a translator filter circuit for the pH signal, circuit40b is a translator filter circuit for the pS⁻⁻ signal, and circuit 40cis a translator filter circuit for the temperature signal. Thesesubstantially identical circuits also filter the input signal to furtherremove spurious high frequency signals. The filtered voltage signals aresubsequently retransformed to current signals by the circuits 40a, b, c.

The translator filters 40a, b, c are primarily adapted for the removalof undesired lower frequencies in the range of, for example about 10 hzto about 1 MHz, with higher frequencies being removed primarily by rffilters such as filters 3a, 3b, 3c, 3d.

In pH translator filter circuit 40a, the filtered pH voltage signaldeveloped across resistor R44 is input to operational amplifier U1 pins12, 13, and is output as a current signal at the collectors of Q3 andQ4. Accordingly, the input to circuit 10a comprises two currents, one ofwhich is the current-to-voltage-to-current pH current signal, and theother of which is a current controlled by resistors R53 and R41, whichis a constant current adjustable from the front panel (corresponding topH cal pot 326, FIGS. 1,3). Through the use of this variable resistorR41, the amount of constant current subtracted from the current comingin from the translator filter circuit for the pH signal may be variedfor calibration solution of known pH. The amount of current subtractedincludes an amount of current to compensate for the constant currenttransmitted over the pH line for utilization by the transmitter constantcurrent circuit elements. Circuits 40b and 40c function in substantiallythe same way as circuit 40a to perform a translation-filtering functionon the pS⁻⁻ and temperature signals, respectively. The pS⁻⁻ calibrationfor the output signal from transistors Q6 and Q7 of circuit 40b isperformed by variable resistor R42, and the temperature signalcalibration for the output current signal of transistors Q8 and Q9 ofcircuit 40c is similarly provided by variable resistor R43. It will beappreciated that in the illustrated embodiment there is no constantcurrent signal to the transmitter which should be removed by circuits40b and 40c.

As previously discussed, the isopotential point of the pH signal is madeto correspond to zero signal through the pH signal amplifier circuitryso that adjustments may readily and directly be made to the gain of thepH signal to compensate the slope of the pH electrode without affectingthe isopotential at pH 7. Accordingly, the operating point of pHamplifiers U1 pins 8, 9, 10 of electrode sensitivity compensatingcircuit 10, U3 pins 12, 13, 14 of inverting filter circuit 5a and U5pins 12, 13, 14 of digital temperature compensating circuit 2a are setto a potential 0.7 volts above the 1.3 volt psuedo ground. Thus, pin 10of pH amplifier U1, pin 12 of pH amplifier U3, and pin 12 of pHamplifier U5 are all set at 2.0 volts.

Circuit 10a is the sensitivity compensation circuit for the pH electroderesponse, and comprises a plurality of binary valued resistors R76, R77,R78, R79 in the feedback resistance circuit further including resistorR52 between pins 8 and 9 of operational amplifier U1. Thus, resistor R76has a resistance value twice that of R77, which in turn is twice that ofR78, which is twice that of R79. The resistance value of each of theresistors R76-79 may be added to the feedback resistance R_(f) bycorresponding switches associated therewith in a manner to change thegain of circuit 10a over a range divided which may be divided into 16discrete intervals by appropriate manipulation of the resistor switches.

In the illustrated embodiment, the various resistance values areselected to provide for gain compensation in circuit 10a for pHelectrodes having sensitivities in the range of 48 millivolts/decade to60 millivolts/decade, to provide the electrode with a nominalsensitivity of 60 millivolts/decade and to provide a gain such that theoutput of circuit 10a is 100 millivolts per decade at 25° C. Theswitches of circuit 10a may be made inaccessible from the front panel toreduce the opportunity for undesired adjustment. The switches may bereadjusted upon electrode replacement, and replacement electrodes may bepre-tested and supplied with switch settings appropriate to correct fortheir individual deviations from ideal sensitivity.

The pH signal output at amplifier U1 pin 8 of circuit 10 increases withincreasing pH, and is supplied to pH filter circuit 50a for filteringand inversion.

The amplifier stage 50a (and corresponding circuits 50b, c) has a unitygain and is primarily utilized to provide signal inversion so the signalwill be at proper polarity for input to the pH temperature compensationcircuit 20a.

However, while amplifier filter stages 50b and 50c are similar toamplifier stage 50a, these stages are also utilized to appropriatelycombine the pH and pS⁻⁻ signals to provide the pHP and the pHS⁻ signals,respectively.

Thus, the pS⁻⁻ signal output from translation filter 40b is directed toan amplifier stage 10b which applies a gain such the pS⁻⁻ output signalat U3, pin 8 has a slope of 100 millivolts per decade of sulfide ionconcentration at 25° C. when a sulfide sensor having a sensitivity of29.6 mV/decade is used. In the illustrated embodiment, the gain ofcircuit 10b is not programmable like that of circuit 10a for the pHelectrode because the pS⁻⁻ electrode has a near-thoretical sloperesponse of 29.6 millivolts per concentration decade. However, it willbe appreciated that increased accuracy could readily be provided throughthe addition of a digital gain programming feature to circuit 10b likethat of circuit 10a.

As indicated, the pH and pS⁻⁻ signals are appropriately combined incircuit 50b, c and for convenience in this regard, inverting operationalamplifier circuit 60 is provided for inverting the pS⁻⁻ signal from U3,pin 8 of circuit 10b. The inverted pS⁻⁻ signal is provided at U3 pin 1of circuit 60. Accordingly, the pH signal is provided in one polarity atamplifier U1 pin 8 of circuit 10a, and in the other polarity atamplifier U3 pin 14 of circuit 50a. Similarly, the pS⁻⁻ signal isprovided in one polarity at amplifier U3 pin 8 of circuit 10b, and inthe opposite polarity at amplifier U3 pin 1 of circuit 60. Note that thepH signal slope (formerly nominally 60 millivolts/decade) is now equalto the pS⁻⁻ slope (formerly nominally 30 millivolts per decade), so thatin combinations, the pH signal must be treated as one half the actualsignal.

To provide the pHP signal, the pH signal polarity available from U3 pin14 and the pS⁻⁻ signal polarity available from U3 pin 8 are added at thesumming node at amplifier U4, pin 13 of circuit 50b. However, becausethe pH is twice as influential in determining the pHP signal as the pS⁻⁻signal, these signals are input through different input resistors R87(for pH) and R81 (for pS⁻⁻) where R87 is half the resistance of R81 sothat the halved pH signal has twice as much gain in circuit 50b as thepS⁻⁻ signal, so the signals are combined on an equal basis. Output 50bprovides an output signal of 100 mV/decade.

The HP amplifier circuit is operational at the isopotential point of theresulting pHP signal, and accordingly, the amplifier U4 pins 12, 13, 14is set to operate at an isopotential point which corresponds to about0.02 parts per million of H₂ S, a value calculated from the bestpresently available experimental and theoretical data.

Because the HP meter circuitry operates at a zero reference point of 1.3volts like the pH meter circuitry, and because it further has a signalresponse conversion of one volt per decade, the isopotential point ofabout 0.02 ppm for the HP amplifier circuitry is at about -1.614 voltsor -0.314 volts absolute. Since the amplifier cannot be made to operatearound -0.314 volts due to system power supplies being only positive, anarbitrary operating point of 2.2 volts is used for amplifiers U4 pins12, 13, 14, and U4 pins 8, 9, 10. A constant current through resistorR74 is provided which is adapted to cause the output of the amplifier incircuit 20a to attempt to be about -0.314 volts at 2.2 volts inputmaking 2.2 volts the effective isopotential point. (The gain can bechanged without affecting the output when the input= 2.2V). Theamplifier in circuit 20a is not operating normally at 0.02 ppm but itachieves normal operation when the output is between 0-99 (1.3-3.3volts).

The pHS⁻ signal is derived in a similar manner at circuit 50c. In thisregard, the pS⁻⁻ signal of polarity from amplifier U3 pin 1 routedthrough resistor R85 to the summing mode of circuit 50c at operationalamplifier U4, pin 2. The pH signal of polarity from amplifier U1 pin 8is similarly routed through input resistor R83 to U4, pin 2 of circuit50c, with R83 having the same value as R85 because the pH and pS⁻⁻signals are combined in the same proportions in circuit 50c. The pHS⁻circuit operational amplifier circuitry is also operated at theisopotential point of the pHS⁻ system which is at about pHS⁻ of 5.9similarly based on best presently available experimental and theoreticaldata. This corresponds to a voltage of about 1.89 in operationalamplifier circuit U4, pins 1, 2, 3, which includes constant voltagesfrom the electrode system, and constant voltages introduced by thecircuitry such as the 1.3 volt meter reference ground previouslydiscussed. It should also be noted that like the circuit 50a, invertingfilter stages 50b, c also have a filter network to provide a filterstage for undesired audio frequency signal components.

From the respective circuits 50a, b, c, the pH, pHP and pHS⁻ signals areconducted to respective isopotential, temperature compensation stages20a, 20b, 20c, which have digitally controlled, discrete gain variationresponsive to digital temperature information, for compensation of thevariation of the signals with temperature. In this regard, it will berecalled that in pH slope standardization circuit 10a, four binary valueresistors R76, R77, R78, R79 are provided to digitally adjust thefeedback resistance v_(f) of differential amplifier U1, pins 8, 9, 10over 16 steps of pH gain which are correspondingly selectable by fourswitches adapted to enable or disenable the four resistors. Eachresistor in the R76-R79 series is twice the value of the precedingresistor and the values of those resistors may be varied in combinationwith the value of feedback resistor R52, to provide for the gain rangein respect of the pH electrode compensation.

Temperature compensation circuits 20a, b, c similarly comprise a networkof fixed resistors and switches, the operation of which will bespecifically described with respect to circuit 20a. Circuit 20acomprises operational amplifier U5, pins 12, 13, 14 in inverting voltagegain configuration with a feedback resistance R_(f) determined by fixedfeedback resistor R88 and switchable binary value resistors R89, R90,R91, R92. This produces an operational amplifier circuit adapted toprovide a digitally controlled gain range. The binary resistors R89-R92are controlled by the temperature information derived from thetransmitter which is digitized and stored by binary A/D converter 356and temperature data latch 376 (FIG. 3). The resistor switching iscontrolled by integrated circuit switch U7, pins 1, 4, 8, 11 (input) 2,3, 9, 10 (output) 13, 5, 6, 12 (control) of circuit 20a as shown in FIG.5. The binary data is supplied to the control pins 13, 5, 6, 12 of U7 toenable or disenable resistors in corresponding binary valuerelationships, to effect incremental gain variation such that the outputsignal at U5, pin 14 does not vary with temperature. Of course, the pHamplifier U5, pins 12, 13, 14 is operated at the pH isopotential pointof the circuit of 2 volts (pH isopotential point of 0.7 volts plus 1.3volt instrument ground). Thus, the amplifier U5, pins 12, 13, 14compensates for the variations in pH slope with temperature. The gainrange provided by circuit 20a (and 20b, c) is correlated to thetemperature range of the drilling mud, and in this regard the circuits20a, b, c are adapted to operate over a temperature range extending fromzero to 80 degrees C. (drilling mud will not normally exceed about 65°C.). Thus, each digitized division of the circuits 20a, b, c correspondsto 5° centigrade.

The pHP temperature compensation circuit 20b is substantially identicalto pH circuit 20a, except that it is operated at 2.2 volts rather thanthe pH isopotential point, and is provided with a different fixedresistance value R110 to provide a 1 volt per decade HP signal.

The pHS⁻ temperature compensation circuit is like that of circuit 20a,and is operated at the pHS isopotential point as discussed in connectionwith circuit 50c.

Thus, temperature compensated pH, pHP and pHS⁻ signals are provided atthe respective outputs of circuits 20a, b, c. From pin 14 of amplifierU5 of circuit 20a, the pH signal is routed directly off the board viaedge connection to the pH analog to digital signal convertor 346 anddisplay 318 as shown in FIG. 3. The pHS⁻ signal is similarly routed frompin 7 of amplifier U4 of circuit 20c to A/D converter 350 and display302. The compensated pHP signal from amplifier U4, pin 8 of circuit 20bis commutated to A/D converter 356 for antilog conversion and eventualdisplay at display 308.

As indicated, digitized temperature information is used in circuits 20a,b, c and in this regard, analog temperature signal from the temperaturetranslator filter 40c is directed to the summing node at pin 6 ofamplifier U3, pins 5, 6, 7 where temperature calibration variableresistor R43 (calibration control 326 of FIG. 3) enables the removal ofa constant from the temperature signal current input to calibrate theoutput at pin 7 of amplifier U3, pins 5, 6, 7 to the desired temperaturereading. The temperature signal and the pHP signal are alternatelydirected to the A/D converter 356, and this commutation is carried outby a commutator circuit comprising integrated switches U6, pins 3, 4, 5and pins 6, 8 and 9 together with operational amplifier U5 pins 8, 9 and10. The two parts of integrated circuit U6 are similar to integratedswitch circuits U7, U8 and U9 used in digital temperature compensationcircuits 20a, b, c.

Switch U6, pins 3, 4, 5 controls the input of the pHP signal toamplifier U5, pins 8, 9, 10 from the output of circuit 20b, while switchU6, pins 6, 8, 9 controls the input of the temperature signal from pin 7of amplifier U3, pins 5, 6, 7, to commutate the data into the dataconverter 326 (FIG. 3) so that the same A/D converter may be used fordigital conversion of the respective pHP signal and temperature signal.

In operation, switch U6, pins 3, 4 and 5 and switch U6, pins 6, 8 and 9alternately connect to operational amplifier U5, pin 10. When thecontrol signal at pin 5 for switch U6 pins 3 and 4 is activated, thatswitch conducts the pHP output from circuit 20b into operationalamplifier U5 configured as a unity gain voltage follower circuit havingthe same voltage at the input and the output. In this manner, theimpedance of switches U6, pins 3, 4, 5, 6, 8, 9 does not substantiallyaffect the A/D conversion. Moreover, 10K resistors R7, R9 isolate theoutputs of temperature calibration circuit U3, pin 7 and the pHP circuit20b to avoid noise in the circuit and to limit the amount of currentwhich flows between the differing voltages appearing at the output ofamplifier U4, pin 8 of circuit 20b and amplifier U4, pin 7 of circuit20c.

As previously discussed in connection with FIG. 3, the digitallyconverted pHP information is routed through a read-only memory look-uptable which converts it to a linear quantity for display.

The alternately selected output of commutator amplifier U5, pin 8 isdirected to the A/D converter 356 along conductor M (to FIG. 6) underthe control of logic circuit 70 (FIG. 6). Each time the A/D converter356 goes through one conversion, it puts out a reset pulse which inaddition to being used for internal A/D function, changes the state ofthe "flip-flop" circuit U10, pins 1, 2 and 3 of circuit 70.

The output of pins 1 and 2 of the flip-flop circuit U10 are directedrespectively to switches U6, pins 3, 4 and 5 and U6 pins 6, 8 and 9 toeffect the previously described alternating signal selection. Othercircuitry appropriately correlates the A/D converter data output fortransmission and storage at the HP data latch 358, or temperature datalatch 376 (FIG. 3). This determination of data type is also based on thestate of U10 pins 1 and 2. The analog input signals are switched justafter to a strobe pulse (over strobe conductor of circuit 70) whichstrobe pulse transfers the data in the counters of the A/D converter 356to latches U14 which store the information. The temperature latchinformation is transmitted to the temperature compensation circuits 20a,b, c by conductors T0, T1, T2, T3. The HP latch is physically locatedwith the A/D converter 356 (FIG. 3) which performs the conversion.

It is determined through the output Q and Q of flip-flop U10, pins 1, 2through nand gates U15, pins 8, 9, 10 and nand gate U15, pins 12, 13 and11, whether the data will be strobed into the HP latches or temperaturelatches U14. The HP latch command leaves the control board to the HPlatches via conductor entitled "not strobe HP out". Temperature strobeinformation is given to latch U14, pin 5 by nand gate U15, pin 11. Otherdata, such as indication of overrange or underrange data, is received byflip-flop U10, pin 12, flip-flop U11, pin 2 and flip-flop U11, pin 12.Lines A4-7 represent unlatched temperature data, and the lines B0-3represent respectively latched HP data (in) and selected data fordisplay (out). Logic circuit 70 also provides for display selection forthe data through appropriate routing circuitry. In this regard, HP isnormally displayed on the front panel, but by pressing the display lightswitch previously described, the temperature information will bedisplayed. This function is handled by integrated switch circuits U12and U13 of circuit 70.

Circuit 80 of FIG. 6 is a voltage reference circuit similar to thevoltage reference circuit 1 of the transmitter. It employs a referencezener diode CR7 through which is maintained a constant current byoperational amplifier U5, pins 1, 2, 3. A constant reference voltagesupply is provided at operational amplifier U5, pin 1, with reference tothe ground potential of the instrument. This circuit provides the lowimpedance 1.3 volt supply which is the artificial meter ground.

Diode CR8 is a protective diode similar to diodes CR16, 17, 18 providedin circuits 20a, b, c. These prevent the A/D converter inputs fromexceeding 5 volts. Resistors R25, R26, R23, R24, R21 and R22, arevoltage dividers off an 8 volt precision supply which provides theisopotential voltage points for use in the inverting gain operationalamplifier circuits of FIG. 5.

Circuit 90 is voltage comparator circuit which runs off of a 24-28 voltsupply, to compare that 24 volt supply against a reference to see if ithas dropped too low (e.g., 19.5 volts) for normal operation of theapparatus 10.

Circuit 100 is a low current detector comprising the three operationalamplifier sections of U2 which are three comparators for testing whetherenough current is flowing through the current sensing resistors R44, R54and R63, to indicate that the transmitter is in normal operation. Ifsufficient current is not flowing to indicate normal operation, circuit100 will assume that an open circuit condition exists (e.g., one of thetransmission wires of cable 18 has been broken) and will appropriatelychange logic states. The signals from all the U2 operational amplifiersof both circuit 9 and circuit 10 are all combined in one signal at nandgate elements U16, pins 1, 2, 3 and 11, 12, 13 and nor gate element U17,pins 11, 12, 13. The combined signal thus provided at nor gate U17, pin1 is a combined "trouble" signal to circuit 110 which, after a slighttime constant delay determined by capacitor C3 and resistor R10, willde-energize the trouble relay 390 and cause capacitor C4 to dischargequickly through resistor R13 and control switch U6, pins 10, 11 and 12.When capacitor C4 is discharged past the voltage threshold of controlswitch U16 at pin 8, then control switch U16, pin 10 will go high, U18,pin 10 will go low, U18, pin 12 will go high, which will energizetransistor Q2 through R15 and cause the "trouble" light 325 to turn onat the instrument panel.

If the aberrant condition(s) returns to normal the original condition ofcircuit 110 will be restored after a time during which capacitor C4 isslowly charged through resistor R12.

The circuitry of FIGS. 4, 5 and 6 is shown in detail including specificcomponents layout and circuit element values. Further in this regard,the indicated resistances are in ohms, and capacitances are in microfarads. The diodes are 1N4148 diodes of Fairchild Semiconductor, theoperational amplifiers are LM324 integrated circuits of NationalSemiconductor, with supply connections as follows:

    ______________________________________                                                      V.sup.+         COM                                             ______________________________________                                        U1, U2        +28V to pin 4   pin 11                                          U3, U4, U5    +15V to pin 4   pin 11                                          ______________________________________                                        The indicated CMOS supply connections are as follows:                          Motorola CMOS part no.                                                                       V.sup.+ Pin                                                                             (15 volts)                                                                             COM Pin                                    ______________________________________                                        14016 (Analog SW)                                                                             14                 7                                          14013 (Flip-Flop)                                                                             14                 7                                          14011 (Nand)    14                 7                                          14001 (Nor)     14                 7                                          14042 (Latch)   16                 8                                          14519 (Data SW) 16                 8                                          14047 (Inverter)                                                                               16, 1             8                                          ______________________________________                                    

The appropriate connectors are made to conventional circuit elements asshown in FIG. 3, which need not be further described.

Accordingly, it will be appreciated through the present disclosure,methods and apparatus for remotely monitoring soluble sulfides indemanding environments such as oil well drilling muds, have beenprovided. The instrument may be calibrated with a suitable referencesolution, such as by means of a test kit comprising a container havingtherein a predetermined amount of buffering agent (e.g. 500 cc. of verypure 0.0666 molar borax solution) and a prepackaged, dry mixture of anH₂ S clathrate compound and an antioxidant (e.g. 4.4 grams of ascorbicacid and 0.05 grams of a stable H₂ S releasing primary gas standardclathrate product of Chromalytics Corporation, division of SPEXIndustries, Inc.) When mixed, the antioxidant dissolves, and theclathrate releases its H₂ S to give a test solution of pH 9.3, HP 10,and pHS 3.2 is provided by the indicated materials. It will further beappreciated that while the present invention has been particularlydescribed with respect to one specific embodiment, various modificationsand adaptations will be apparent based on the present disclosure, andsuch modifications and adaptations are intended to be within the spiritand scope of the present invention.

Various features of the invention are set forth in the following claims.

I claim:
 1. Apparatus for measuring the concentration of hydrosulfideion in well drilling mud comprising, in combination,hydrogen ionelectrode means for providing an output signal having an electricalpotential which is a function of hydrogen ion concentration, sulfide ionelectrode means for providing an output signal having an electricalpotential which is a function of sulfide ion concentration, means forsubtracting a signal representative the electrical potential of thehydrogen ion electrode means from a signal representative of theelectrical potential of the sulfide ion electrode means in a ratio ofhydrogen ion potential to sulfide ion potential of about 1:2 to providea difference output signal which varies as a function of hydrosulfideion concentration.
 2. Apparatus in accordance with claim 1 wherein saiddifference output signal is directly proportional to hydrosulfide ionpotential.
 3. In a method for determining hydrosulfide ion (HS⁻)concentration of well drilling mud by appropriately subtracting from atemperature dependent signal representing sulfide ion electrochemicalpotential of said mud, a temperature dependent signal proportionatelyrepresenting substantially half of the hydrogen ion electrochemicalpotential of said mud to provide a temperature dependent pHS⁻ signal,the improvement comprising,providing temperature compensation for saidtemperature dependent pHS⁻ signal by adjusting the gain of said signalabout its isopotential point to provide a temperature compensated pHS⁻signal which is compensated about its isopotential point to provide atemperature independent pHS⁻ signal which does not vary substantiallywith varying temperature of the mud being measured.
 4. A method formeasuring the concentration of hydrosulfide ion in well drilling mudcomprising the steps ofmeasuring hydrogen ion concentration in said mudto provide an output signal having an electrical potential which is afunction of hydrogen ion concentration, measuring sulfide ionconcentration in said mud to provide an output signal having anelectrical potential which is a function of sulfide ion concentration,and subtracting said signal representative the electrical potential ofthe hydrogen ion concentration from said signal representative of theelectrical potential of the sulfide ion concentration in a ratio ofhydrogen ion potential to sulfide ion potential of about 1:2 to providea difference output signal which varies as a function of hydrosulfideion concentration.
 5. A method in accordance with claim 4 wherein saiddifference output signal is directly proportional to hydrosulfide ionpotential.
 6. In apparatus for determining hydrosulfide ion (HS⁻)concentration of well drilling mud including means for appropriatelysubtracting from a temperature dependent signal representing sulfide ionelectrochemical potential of said mud, a temperature independent signalproportionately representing substantially half of the hydrogen ionelectrochemical potential of said mud to provide a temperature dependentpHS⁻ signal, the improvement comprising means for providing temperaturecompensation for said temperature dependent pHS⁻ signal by adjusting thegain of said signal about its isopotential point to provide atemperature compensated pHS⁻ signal which is compensated about itsisopotential point to provide a temperature independent pHS⁻ signalwhich does not vary substantially with varying temperature of the mudbeing measured.
 7. In a method of determining hydrosulfide ion (HS⁻)concentration of well drilling mud by appropriately subtracting from atemperature dependent signal representing hydrogen ion electrochemicalpotential of said mud, a temperature dependent signal proportionatelyrepresenting substantially half of the sulfide ion electrochemicalpotential of said mud to provide a temperature dependent pHS⁻ signal,the improvement comprising,providing temperature compensation for saidtemperature dependent pHS⁻ signal by adjusting the gain of said signalabout its isopotential point to provide a temperature compensated pHS⁻signal which is compensated about its isopotential point to provide atemperature independent pHS⁻ signal which does not vary substantiallywith varying temperature of the mud being measured.
 8. In apparatus fordetermining hydrosulfide ion (HS⁻) concentration of well drilling mudincluding means for appropriately subtracting from a temperaturedependent signal representing hydrogen ion electrochemical potential ofsaid mud, a temperature independent signal proportionately representingsubstantially half of the sulfide ion electrochemical potential of saidmud to provide a temperature dependent pHS⁻ signal, the improvementcomprising means for providing temperature compensation for saidtemperature dependent pHS⁻ signal by adjusting the gain of said signalabout its isopotential point to provide a temperature compensated pHS⁻signal which is compensated about its isopotential point to provide atemperature independent pHS⁻ signal which does not vary substantiallywith varying temperature of the mud being measured.